smhsfandomcom-20200214-history
Deployment Guidelines
This article contains information on the deployment of database objects and dynamic content. Database objects - ad-hoc deployment The instructions below are for ad-hoc deployment of database objects - these are deployments likely to be done for dynamic content. *Before starting - make sure your database changes go into the DB folder in TFS and, when applicable, into the branch folder as well. *Create a DB sub-folder under the folder containing the object you've developed. **All the DB scripts created should be placed there and added into TFS - these will be used only for ad-hoc deployment. **All the database changes must also be applied into the database folders in TFS. *Add a script for Create sequence (if applicable) and add into TFS. *Add a script for Create/Alter tables: **Make sure the primary key is also contained on the script **'When creating new tables': ***Add a comment for each column, matching the column with the front-end label ***Example: DATE_ASSESSMENT column, "Assessed On" comment. ***For non-visible foreign key columns (such as SHA_EPISODE_NUM), write the table name in plain english (Trust Spell number). **If creating a new table, add the script file into TFS. **If modifying an existing table, update the TFS script with the changes. *Add a script for Create/modify foreign keys **If creating a new constraint, add the script file into TFS. **If modifying an existing constraint, update the TFS script with the changes. *Add script for create/modify triggers (if applicable) **If creating a new trigger, add the script file into TFS. **If modifying an existing trigger, update the TFS script with the changes. *Add a script for create/modify audit tables **If creating a new table, add the script file into TFS. **If modifying an existing table, update the TFS script with the changes. *Add script for create/modify audit triggers **If creating a new trigger, add the script file into TFS. **If modifying an existing table, update the TFS script with the changes. *Add script to modify PL/SQL code, such as procedures, functions and packages: **If creating a new object, add the script file into TFS. **If modifying an existing object, update the TFS script with the changes. *Create a separate script for GRANTS **Please note that grants should not be added the main TFS database folders or the Install folders. Grants are done automatically during upgrades. **Grant SELECT, UPDATE, INSERT, DELETE to PAS_USER. **Grant SELECT to INFOMAKER. **For LPFT only: grant SELECT to PAS_READ_ONLY. **Grant EXECUTE to PAS_USER on procedures, packages and functions. **If your object is not within the PAS '''schema, grant SELECT, UPDATE, INSERT, DELETE, EXECUTE (whichever applicable) to '''PAS. Registering and deploying a report #Create the definition via the Report Definition tool #After saving, click on the Generate button. A TXT file will be be created as result. #Open the text file and copy the content into a PL/SQL Developer window. #If your report name or arguments use an apostrophe, make sure to add an extra ‘ on the script. (Ex.: Fairburn’’s) #If your report has a Selector which uses functions, make sure to remove the double quotes around the SQL statement and to add an extra ‘ on the script whenever applicable (such as in functions). #Apply the beautifier. If it fails (as in, it doesn’t beautify anything or just partially), there is something wrong with the script – repeat steps 3 to 5 as the beautifier will mess up the VALUES clause for some reason. #Run the script #Save the SQL file under the install folder of the applicable version. #Add the SQL file into TFS and check-in changes. Registering a core window Write the first section of your page here. Section heading Write the second section of your page here.